package ac.github.os.internal.core.config.type

import ac.github.os.internal.core.config.DataType
import ac.github.os.internal.session.Session

class DataArray : DataType<List<Any>> {
    override fun toValue(string: String, session: Session): List<Any> {
        if (string.first() == '[' && string.last() == ']') {
            return string.substring(1, string.length - 1).split(",")
        }
        return listOf(string)
    }
}